<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IDC业务管理系统</title>
<script src="jquery/jquery.js" type="text/javascript"></script>
<script src="jquery/jquery.validate.js" type="text/javascript"></script>
<script type="text/javascript">
$().ready(function() {	
	$("#loginForm").validate({
		rules: {
			j_username: "required",
			j_password: {
				required: true,
				minlength: 5
			}
		},
		messages: {
			j_username: "用户名必填",
			j_password: "密码必填"
		}
	});
});
</script>
<style type="text/css">
html, body, div {
	margin:0;
	padding:0;
	color:#0D377C;
	text-align:center;
	font-size:12px;}
body {
	margin:0 auto;
	background:#a3c5ec url(images/bg.jpg) repeat-x;}
#contain {
	height:330px;
	width:570px;
	text-align:left;
	margin:0 auto;
	margin-top:70px;
	padding-left:170px;
	padding-top:150px;
	background:transparent url(images/login-bg.jpg) left top no-repeat;}
#content {
	cursor:default;
	width:220px;
	padding-left:30px;}
tr#msg {
	color:#C00;
	display:none;}
th {
	text-align:right;
	font-weight:normal;}
td {text-align:left;}
#td-btn, #td-msg {padding-left:38px;}
#td-btn {padding-top:5px;}
input {border:none;}
input#j_username, input#j_password, input#scode {
	margin:0;
	height:18px;
	color:#0D377C;
	border:solid 1px #D1DEEE;
	background:url(images/btn_bc.png) repeat-x;}
input#j_username:hover, input#j_password:hover, input#scode:hover {background-image:none;}
input#j_username, input#j_password {width:170px;}
input#scode {width:90px;}
input.btn {
	height:20px;
	width:60px;
	cursor:pointer;
	color:#FFF;
	background-color:#0D377C;
	border-style:solid;
	border-width:1px;
	border-color:#83a7d4 #092149 #092149 #83a7d4;}
img{border:solid 1px #D1DEEE; float:right;}
</style>
</head>
<body>

<div id="contain">
	<div id="content">
		<form action="loginManager-login.action" method="post" name="loginForm" id="loginForm">
		<div style="color: red; display:  ${param.error == true ? 'block;' : 'none;'}"> 
			  登陆失败: ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}
		</div> 
			<table border="0" cellpadding="0" cellspacing="2px">
				<tr>
					<th>用户名</th>
					<td colspan="2"><s:textfield name="j_username"></s:textfield></td>
				</tr>
				<tr>
					<th>密&nbsp;&nbsp;码</th>
					<td colspan="2"><s:password name="j_password"></s:password></td>
				</tr>
				<%--
				<tr>
					<th>验证码</th>
					<td>
					<input id="scode" type="text" name="randNum" maxlength="4" size="8" value="" onkeydown="if(event.keyCode==13) CheckMloginSubmit()"/></td>
         	<td><img name="safeCode" src="<%=request.getContextPath()%>/servlet/ImageServlet" border=0 valign="bottom" ></td>
				</tr>
				 --%>
				<tr>
					<td colspan="3" id="td-btn"><input class="btn" type="submit" value="登入" />
					<input class="btn" type="reset" value="清空" /></td>
				</tr>
				<tr id="msg">
					<td colspan="3" id="td-msg">登陆信息不能留空</td>
				</tr>
              </table>
		</form>
	</div>
</div>



<%--
<center>
<form action="loginManager-login.action" method="post">
<div style="display:  ${param.error == true ? 'block;' : 'none;'}"> 
  登陆失败: ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}
</div> 
<fieldset style="width: 180px;">
	<legend>Login</legend>
	<table>
		<tr>
			<td>用户名:</td>
			<td><input name="j_username" type="text" value="${sessionScope['SPRING_SECURITY_LAST_USERNAME']}" size="12"></td>
		</tr>
		<tr>
			<td>密&nbsp;码:</td>
			<td><input name="j_password" type="password" size="12"></td>
		</tr>
		<!-- 
		<tr>
			<td colspan="2"><input type="checkbox" name="_spring_security_remember_me4" />两周之内不必登陆</td>
		</tr>
		 -->
		<tr>
			<td colspan="2" align="right"><input name="submit" type="submit" value="登录"/></td>
		</tr>
	</table>
</fieldset>
</form>
</center>
 --%>
</body>
</html>